package cn.kys.modules.system.service;


import cn.kys.modules.system.pojo.LayerDto;
import cn.kys.modules.system.pojo.SubtaskGeom;
import cn.kys.modules.system.pojo.SubtaskVo;
import cn.kys.modules.system.pojo.dto.SubTaskDto;
import io.swagger.models.auth.In;
import org.locationtech.jts.io.ParseException;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.rmi.MarshalledObject;
import java.util.List;
import java.util.Map;

public interface TaskService {

    Map addTask(String name, int caseid, String casename, boolean is_public, String lat, String lon);

    void addTaskUsers(String taskid, String userJson);

    Map editTaskStatus(String id, String status);


    List getAllTasks();

    List getFinishAndUnFinishTaskNum();

    List getTasksByParam(boolean is_public);

    void editPolygonStatus(String subtaskPolygonId, String status);

    void bingindgPolygonMongodb(String taskid, String subTask);

//    void bingindgPolygonPG(String taskid, String subTask);


    void bingindgPolygonPG(Integer taskid, SubTaskDto subTaskDto);

    void bingindgPolygonPG(String taskid, String subTask);

    Map judgeBingdingPolygon(String taskid, String subTask);

    Map getMVTByPerson(String subtaskid, String tileName, int x, int y, int z);

    Map getMVTByLayerName(String layername, String tileName, int x, int y, int z);

    /*
         2024-06-03 新写 zxw
         删除绑定范围的图斑——手绘范围和t_subtask_geom做相交 删除t_subtask_geom中对应的相交polygon
         */
    void delBindingPolygonPG(Integer taskid, SubTaskDto subTaskDto);
    Map getMVTByTask(String taskid, String tileName, int x, int y, int z);

    Map getMVTByGrid(String tileName, int x, int y, int z, String maxLat, String minLat, String maxLon, String minLon, String metre);

    List getUsers(String roleStr);

    List getUsersByTaskId(String taskid);

    List<SubtaskVo> getUsersByTaskIdPc(Integer taskid) throws IOException, ParseException;

    Map editTaskContent(String id, String name, int caseid, String casename, boolean is_public, String lat, String lon) throws Exception;

    void delTaskByIds(String ids);

    Map findFormContentByCaseId(String subtaskid, String edit_geoid, String caseid);

    Map findGeomByPos(String taskid, String subtaskid, String lon, String lat);


    void exportShpPolygon(HttpServletRequest request, HttpServletResponse response, String subtaskid);


    /**
     * 查询全部部门数据
     *
     * @return
     */
    List list();

    List listCondition(String name, String casename, boolean isPublic);

    Long countUncommit(Integer taskid);

    List<Map> showPolygonList(SubtaskGeom subtaskGeom);

    List<Integer> assignUnboundPolygon(LayerDto layerDto);
}
